123456789101112131415161718192021222324252627282930 |
- "use client";
- import { useEffect } from "react";
- export default function Error({
- error,
- reset,
- }: {
- error: Error & { digest?: string };
- reset: () => void;
- }) {
- useEffect(() => {
- // Log the error to an error reporting service
- console.log(`🎯🎯🎯🎯🎯-> in error.tsx on 15`, error.message);
- }, [error]);
- return (
- <div className={"flex flex-col items-center justify-center"}>
- <h2>Something went wrong!</h2>
- <button
- onClick={
- // Attempt to recover by trying to re-render the segment
- () => reset()
- }
- >
- Try again
- </button>
- </div>
- );
- }
|